home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1984-05-31 | 4.5 KB | 178 lines |
- 1000 FOR I = 1 TO 10
- 1010 SOUND 1200,3
- 1020 FOR J = 1 TO 150 : NEXT J
- 1030 NEXT I
- 1040 FOR I = 1 TO 2
- 1050 FOR FREQ = 500 TO 1500 STEP 10
- 1060 SOUND FREQ, 0.01*18.2
- 1070 NEXT FREQ
- 1080 NEXT I
- 1090 CLS:NEWRATE = 0
- 1100 PRINT
- 1110 PRINT
- 1120 PRINT " W E L C O M E T O M I S S I L E B L A S T
- 1130 PRINT
- 1140 PRINT
- 1150 PRINT
- 1160 PRINT " Missiles Blast is a ground to air missile game written for the"
- 1170 PRINT " IBM Personal Computer with a monochrome display only."
- 1180 PRINT " The object of the game is to destroy the alien spaceships"
- 1190 PRINT " as they fly over your missile launcher."
- 1200 PRINT " You will be given 25 missiles to destroy as many spaceships"
- 1210 PRINT " as you can.
- 1220 REM Stop program until key is pressed.
- 1230 LOCATE 23,1
- 1240 PRINT "Press c to continue"
- 1250 C$ = INKEY$ : IF C$ ="" THEN 1250
- 1260 CLS
- 1270 PRINT
- 1280 PRINT
- 1290 PRINT
- 1300 PRINT
- 1310 PRINT
- 1320 PRINT
- 1330 PRINT " The maximum score possible is 2500 points. You will be "
- 1340 REM This is a ground to air missile game named ALBLAST.
- 1350 PRINT " awarded 100 points for each spaceship you destroy."
- 1360 PRINT " Your score and rating will be displayed at the end of the"
- 1370 PRINT " of the game. The highest possible rating is UNIVERSE CLASS"
- 1380 PRINT " star warrior.
- 1390 PRINT " Missiles can be fired from the missile launcher by pressing"
- 1400 PRINT " the space bar.
- 1410 PRINT SPC(80)
- 1420 PRINT " Only one missile can be fired at a time. Another missile "
- 1430 PRINT" cannot be launched unless the previous missile is off the screen"
- 1440 REM The object of the game is to destroy the alien spaceship.
- 1450 REM Stop program until key is pressed
- 1460 LOCATE 23,1
- 1470 PRINT "Press r to start game"
- 1480 R$ = INKEY$ : IF R$ ="" THEN 1480
- 1490 REM flying over head.
- 1500 REM You can destroy the spaceship with skill and accuracy by
- 1510 REM firing your missiles at the right time.
- 1520 REM Missiles are fired by pressing the space bar.
- 1530 REM This program was written by Albert W. Brown Jr.
- 1540 REM 3157 Everdale Drive San Jose California 95148 (408)274-4271
- 1550 KEY OFF
- 1560 CLS
- 1570 REM Design missile,missile launcher,spaceship,explosion.
- 1580 MISCO = 25
- 1590 BULL$ = CHR$(33)
- 1600 EXP1$ = SPACE$(34)+ CHR$(195) +SPACE$(5)+CHR$(233)+SPACE$(5)+CHR$(180)
- 1610 ML$ = CHR$(201)+CHR$(202)+CHR$(187)
- 1620 SS$ = CHR$(32)+CHR$(195)+CHR$(233) +CHR$(180)+CHR$(32)
- 1630 REM Locate missile launcher.
- 1640 A$ = CHR$(192)+CHR$(33)+CHR$(217)
- 1650 FOR I = 50 TO 75 STEP 6
- 1660 LOCATE 23,I
- 1670 PRINT A$
- 1680 NEXT I
- 1690 LOCATE 25,38
- 1700 PRINT ML$
- 1710 MIS = 23:SIL = 39
- 1720 C = 1
- 1730 FLAG = 0
- 1740 REM Check and see if spaceship is off of screen.
- 1750 FLAG = 0 : R = 1
- 1760 IF C = 80 -5 THEN R = R + 5 : C =1
- 1770 C = C+ 1
- 1780 REM Display spaceship
- 1790 IF R = 26 GOTO 1840
- 1800 LOCATE R,C
- 1810 PRINT SS$;
- 1820 LOCATE R,75
- 1830 PRINT SPC(6)
- 1840 IF R =26 THEN :CLS : GOTO 1690
- 1850 IF FLAG = 1 THEN GOTO 1950
- 1860 REM Check and see if a missile has been launched.
- 1870 K$ = INKEY$
- 1880 IF K$ <> " " THEN GOTO 1760
- 1890 MISCO = MISCO - 1
- 1900 IF MISCO =-1 THEN GOTO 2330
- 1910 GOSUB 2640
- 1920 SOUND 300,1
- 1930 FLAG = 1
- 1940 REM Fire missile at spaceship
- 1950 LOCATE MIS,SIL
- 1960 BULBLK =MIS+1
- 1970 PRINT BULL$
- 1980 SOUND 3000,0.1
- 1990 REM Blank out previous image of missile.
- 2000 LOCATE BULBLK,SIL
- 2010 PRINT SPC(1)
- 2020 LOCATE 1,39
- 2030 PRINT SPC(1)
- 2040 MIS = MIS -1
- 2050 REM Check and see if spaceship has been hit.
- 2060 IF MIS = 0 THEN MIS =22 : FLAG = 0 : GOTO 1760
- 2070 IF MIS=R+1 AND C >=31 AND C<=38 THEN GOTO 2110
- 2080 REM If spaceship has been hit record score and reset.
- 2090 IF FLAG = 1 GOTO 1760
- 2100 GOTO 1720
- 2110 CLS
- 2120 I = 3
- 2130 FOR I = 1 TO I + 2
- 2140 LOCATE MIS , SIL
- 2150 REM Display explosion.
- 2160 COLOR 15
- 2170 PRINT EXP1$;
- 2180 COLOR 7
- 2190 NEXT
- 2200 CLS
- 2210 SCORE = SCORE + 100
- 2220 LOCATE 25,1
- 2230 REM Print score.
- 2240 PRINT "Your score is now "SCORE" points "
- 2250 SOUND 50,10 : SOUND 40,6
- 2260 PLAY "t45;o3;l32;dgb"
- 2270 PLAY "o4;d
- 2280 PLAY "p30"
- 2290 PLAY "o3;b
- 2300 PLAY "o4;l8;d
- 2310 REM Start all over .
- 2320 GOTO 1630
- 2330 MISCO = 0
- 2340 IF SCORE < 600 GOTO 2390
- 2350 IF SCORE >= 600 AND SCORE < 1200 GOTO 2400
- 2360 IF SCORE >= 1200 AND SCORE < 1800 GOTO 2410
- 2370 IF SCORE >= 1800 AND SCORE < 2500 GOTO 2420
- 2380 IF SCORE = 2500 GOTO 2430
- 2390 CLA$ = "Novice Class " :RATE = 1: GOTO 2440
- 2400 CLA$ = "Amateur Class" :RATE = 2: GOTO 2440
- 2410 CLA$ = "World Class" :RATE = 3:GOTO 2440
- 2420 CLA$ = "Galaxy Class":RATE = 4: GOTO 2440
- 2430 CLA$ = "Universe Class" :RATE =5 :GOTO 2440
- 2440 STAW$ = " star warrior"
- 2450 LOCATE 12,35
- 2460 COLOR 31
- 2470 PRINT "GAME OVER"
- 2480 COLOR 7
- 2490 LOCATE 14,20
- 2500 PRINT "Your score for this game is"SCORE" points."
- 2510 LOCATE 16,20
- 2520 PRINT "This score qualifies you as a:"
- 2530 LOCATE 18,20
- 2540 PRINT CLA$ + STAW$
- 2550 IF RATE > NEWRATE THEN GOTO 2560 ELSE 2570
- 2560 NEWRATE = RATE
- 2570 LOCATE 21,12
- 2580 LOCATE 22,40
- 2590 PRINT " "
- 2600 PRINT " Print S to start another invasion or T to terminate."
- 2610 X$ = INPUT$(1)
- 2620 IF X$ ="T" OR X$="t" THEN 2670
- 2630 RUN 1550
- 2640 LOCATE 25,45
- 2650 PRINT "You now have "MISCO" missiles left." ;
- 2660 RETURN
- 2670 LOCATE 23,20
- 2680 PRINT "You have defended your missile launcher again.
- 2690 LOCATE 25,1
- 2700 PRINT SPC(79)
- 2710 LOCATE 24,1
- 2720 PRINT " Your highest rating was: "NEWRATE" "
- 2730 LOCATE 25,1
- 2740 PRINT" 1 = Novice: 2= Amateur : 3= World : 4= Galaxy : 5= Universe "
- 2750 FOR DELAY = 1 TO 500 : NEXT DELAY
- 2760 CHAIN"MENU",1000
-